package com.seeyon.apps.ext.sso;

import com.seeyon.ctp.portal.sso.SSOLoginHandshakeAbstract;

public class SSOLoginHandshake extends SSOLoginHandshakeAbstract{
//	http://127.0.0.1:80/seeyon/login/sso?ticket=zhangsanNCSSOxxxx&from=ncsso&tourl=%2Fseeyon%2Fcollaboration%2Fcollaboration.do%3Fmethod%3Dsummary%26openFrom%3DlistSent%26affairId%3D-2184019195013282723
	
	@Override
	public String handshake(String ticket) {
		String userLogninName = "";
		if (ticket == null || ticket.equals("")) {
//			System.out.println("ssss33333");
			return null;
		}
//		byte[] key = SecureUtil.generateKey("sso").getEncoded();
//		DES des = SecureUtil.des(key); 
		String userid=ticket.split("NCSSO")[0];
//		System.out.println("userid:===="+userid);
		userLogninName = userid;
		return userLogninName;
	}

	@Override
	public void logoutNotify(String arg0) {
		// TODO Auto-generated method stub
		
	}

}
